<!DOCTYPE html>
<!--引入thymeleaf引擎-->
<html lang="en"  xmlns="http://www.w3.org/1999/xhtml"  xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<center>
    <p th:text="${lists}"></p>
    <table cellpadding="5" cellspacing="0" border="1px">
        <caption>用户列表</caption>
        <thead>
            <tr>
                <th>序号</th>
                <th>用户id</th>
                <th>用户名</th>
                <th>用户密码</th>
                <th>性别</th>
                <th>工资</th>
                <th>地址</th>
            </tr>
        </thead>

        <tbody>
        <!--**th:each：**遍历循环元素-->
            <tr th:each="empty, index:${lists}">
                <td th:text="${index.count}"></td>
                <td th:text="${empty.id}"></td>
                <td th:text="${empty.username}"></td>
                <td th:text="${empty.password}"></td>
                <td th:text="${empty.gender}"></td>
                <td th:text="${empty.salary}"></td>
                <td th:text="${empty.address}"></td>
            </tr>
        </tbody>
    </table>
</center>
</body>
</html>